package com.example.demo.repository;

import com.example.demo.domain.Filedata;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FiledataRepository extends JpaRepository<Filedata,Long> {
    List<Filedata> findAllByOrderByIdDesc();

    Filedata findByFilehash(String filehash);
    Filedata findByFilename(String filename);

    Page<Filedata> findByUserid(Long userid, Pageable pageable);
}
